package pe.gob.sunarp.entidad;

import java.io.Serializable;
import javax.persistence.*;
import java.util.Date;


/**
 * The persistent class for the PRTC_JUR database table.
 * 
 */
@Entity
@Table(name="PRTC_JUR")
public class PrtcJur implements Serializable {
	private static final long serialVersionUID = 1L;
	private PrtcJurPK id;
	private String agntSync;
	private String flagTipo;
	private String nuDoc;
	private String razonSocial;
	private String siglas;
	private String tiDoc;
	private String tipoInst;
	private String tipoPerJur;
	private Date tsUltSync;
	private OficRegistral oficRegistral;

    public PrtcJur() {
    }


	@EmbeddedId
	public PrtcJurPK getId() {
		return this.id;
	}

	public void setId(PrtcJurPK id) {
		this.id = id;
	}
	

	@Column(name="AGNT_SYNC", length=4)
	public String getAgntSync() {
		return this.agntSync;
	}

	public void setAgntSync(String agntSync) {
		this.agntSync = agntSync;
	}


	@Column(name="FLAG_TIPO", length=1)
	public String getFlagTipo() {
		return this.flagTipo;
	}

	public void setFlagTipo(String flagTipo) {
		this.flagTipo = flagTipo;
	}


	@Column(name="NU_DOC", length=12)
	public String getNuDoc() {
		return this.nuDoc;
	}

	public void setNuDoc(String nuDoc) {
		this.nuDoc = nuDoc;
	}


	@Column(name="RAZON_SOCIAL", nullable=false, length=250)
	public String getRazonSocial() {
		return this.razonSocial;
	}

	public void setRazonSocial(String razonSocial) {
		this.razonSocial = razonSocial;
	}


	@Column(length=50)
	public String getSiglas() {
		return this.siglas;
	}

	public void setSiglas(String siglas) {
		this.siglas = siglas;
	}


	@Column(name="TI_DOC", length=2)
	public String getTiDoc() {
		return this.tiDoc;
	}

	public void setTiDoc(String tiDoc) {
		this.tiDoc = tiDoc;
	}


	@Column(name="TIPO_INST", length=2)
	public String getTipoInst() {
		return this.tipoInst;
	}

	public void setTipoInst(String tipoInst) {
		this.tipoInst = tipoInst;
	}


	@Column(name="TIPO_PER_JUR", length=2)
	public String getTipoPerJur() {
		return this.tipoPerJur;
	}

	public void setTipoPerJur(String tipoPerJur) {
		this.tipoPerJur = tipoPerJur;
	}


    @Temporal( TemporalType.DATE)
	@Column(name="TS_ULT_SYNC")
	public Date getTsUltSync() {
		return this.tsUltSync;
	}

	public void setTsUltSync(Date tsUltSync) {
		this.tsUltSync = tsUltSync;
	}


	//bi-directional many-to-one association to OficRegistral
    @ManyToOne
	@JoinColumns({
		@JoinColumn(name="OFIC_REG_ID", referencedColumnName="OFIC_REG_ID", nullable=false, insertable=false, updatable=false),
		@JoinColumn(name="REG_PUB_ID", referencedColumnName="REG_PUB_ID", nullable=false, insertable=false, updatable=false)
		})
	public OficRegistral getOficRegistral() {
		return this.oficRegistral;
	}

	public void setOficRegistral(OficRegistral oficRegistral) {
		this.oficRegistral = oficRegistral;
	}
	
}